const fs = require('fs');
//读取
// const data = fs.readFileSync('1.txt', 'utf8');
// const data = fs.readFileSync('piaofang.json', 'utf-8');
// newData = JSON.parse(data);
// console.log(newData.list.length);

//写入
// const data = fs.writeFileSync('1.txt', 'I am dxc');//覆盖原有的
// json字符串写
const data = {age:32};
fs.writeFileSync('1.json',JSON.stringify(data));
